import request from "@/request/request.ts";
import {pageInterface} from "@/views/home/Interface/Interface.ts";

/* 获取医院列表的接口 */
export const getHospitalAPI = (pagesParams: pageInterface) => {
    return request({
        url: `/hosp/hospital/${pagesParams.pageNo}/${pagesParams.pageSize}`,
        method: 'GET',
        params: {
            hostType: pagesParams.hostType || undefined,
            districtCode: pagesParams.districtCode || undefined
        }
    })
}

/* 获取医院等级以及地区的接口 */
export const getHospitalLevelAndRegionAPI = (dictCode: string) => {
    return request({
        url: `cmn/dict/findByDictCode/${dictCode}`,
        method: 'GET',
    })
}

/* 根据搜索关键字搜索医院的接口 */
export const searchHospitalNameAPI = (hosname: string) => {
    return request({
        url: `hosp/hospital/findByHosname/${hosname}`,
        method: 'GET'
    })
}
